﻿IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Get/*--EntryName--*/Children/*--Info--*//*--Filter--*//*--Sort--*/]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[Get/*--EntryName--*/Children/*--Info--*//*--Filter--*//*--Sort--*/]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Get/*--EntryName--*/Children/*--Info--*//*--Filter--*//*--Sort--*/]
	@UserRoles TNVarCharSet READONLY,
	@Parent nvarchar(MAX)/*--AdditionalParamsComma-*/
/*--TypeParam--*/
/*--OffsetParam--*/
/*--LimitParam--*/
AS
BEGIN
	SET NOCOUNT ON

	DECLARE @ParentId bigint
	
	EXEC GetDirectoryEntryId @Parent, 0, @Id = @ParentId OUTPUT
	
	IF @ParentId IS NULL RETURN 1

/*--LimitedChildrenSelect--*/
END
GO
